<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/common/common.jsp" %>
<html>
<head>
    <meta charset="utf-8"/>
    <script type="text/javascript" src="<c:url value='/resource/jxkh/js/ueditor/ueditor.config.js'/>"></script>
    <script type="text/javascript" src="<c:url value='/resource/jxkh/js/ueditor/ueditor.all.min.js'/>"></script>
    <script type="text/javascript" src="<c:url value='/resource/jxkh/js/ueditor/lang/zh-cn/zh-cn.js'/>"></script>
    <title>厅干部平时考核管理系统</title>
    <script>
        var ue = UE.getEditor('editor');
        function submitForm() {
            $("#content").val(getContent());
            //top.mask();
            $("#submit_form").ajaxSubmit({
                type: "post",
                dataType: "json",
                success: function (data) {
                    if (data.data.status == 1) {
                        showMessage("操作成功！");
                        window.setTimeout(function () {
                            parent. search0bj();
                            var index = parent.layer.getFrameIndex(window.name);
                            parent.layer.close(index);
                        }, 1000);
                    } else {
                        showMessage(data.data.body);
                    }
                },
                error: function () {
                    showMessage("失败！");
                }
            });
        }
        $(function(){
            var ue = UE.getEditor('editor');
            var proinfo=$("#divdata").text();

            ue.ready(function() {//编辑器初始化完成再赋值
                if("${content}"!=""&&"${content}"!=null&&"${content}"!=undefined){
                    ue.setContent('${content}'.replace(/####/g, "\n\r"));
                }else{
                    ue.setContent('${data.content}');
                }
            });
        });
        function getContent() {
            var arr = [];
            arr.push(UE.getEditor('editor').getContent());
            return arr.join("\n");
        }
    </script>
</head>
<body>
<div class="njga" style="overflow: auto;background: #fff;">
    <div class="date_pop" id="date_pop" style="max-height: 500px;padding: 15px 25px;display: block;">
        <form action="<c:url value='/worklog/saveYdxj.json'/>" method="post" id="submit_form">
            <input type="hidden" name="dbid" id="dbid" value="${data.dbid}"/>
            <input type="hidden" name="type" id="type" value="${type }"/>
            <input type="hidden" name="content" id="content" />
            <div class="row_pop_row">
                <div class="pop_rt pop_rt1" style="padding-left: 0;">
                    <script id="editor" type="text/plain" style="width:100%;height:350px;"></script>
                </div>
            </div>
        </form>
    </div>
    <!--日历弹出框结束-->
</div>

</body>

</html>